<?php
/**
 * Description of _main_header
 * 
 * @author trongkhoi
 * @since Oct 7, 2013 - 11:55:44 PM
 */
?>
<div class="header-sub navbar navbar-fixed-top">
    <div class="header-nav cls-opacity" id="header_nav">
        <div class="row-fluid">
            <div class="span12">
                <a href="<?php echo Yii::app()->homeUrl ?>" class="logo small-logo">
                    <?php if (isset($_GET['biz'])): ?>
                        <img src="<?php echo $this->biz->getBizLogo() ?>" />
                    <?php else: ?>
                        <img src="<?php echo $this->assetDir . 'img/logo_small.png'; ?>" />
                    <?php endif; ?>
                </a>
                <div class="span4" style="float: right;">

                    <div class="span6 search-top">
                        <div class="control-group">
                            <div class="controls">
                                <form method="GET" class="input-search" action="<?php echo Yii::app()->createUrl('frontend/search/merchant') ?>">
                                    <?php $m = isset($_GET['m']) ? $_GET['m'] : ''; ?>
                                    <input name="m" type="text" value="<?php echo $m ?>" placeholder="<?php echo Yii::t('frontend', 'Search merchant') ?>" class="search-query span10 search-input search-input-sub">
                                    <button type="submit" class="btn btn-info search-btn"><i class="icon-search"></i></button>
                                </form>
                            </div>
                        </div>				
                    </div>
                    <div class="span6">

                        <?php echo $this->renderPartial('//layouts/_header_account') ?>
                    </div>

                </div>
                <span class="currency br-tooltip" data-toggle="tooltip" title="Currency: Dollar Singapore" data-placement="bottom"> SGD</span>

                <?php $this->widget('application.components.LanguageSelector')?>
                <div class="navbar">
                    <div class="navbar-inner">
                        <div class="container">
                            <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
                            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </a>
                            <!-- Everything you want hidden at 940px or less, place within here -->
                            <div class="nav-collapse collapse">
                                <?php
                                $this->widget('zii.widgets.CMenu', array(
                                    'items' => array(
//                                        array('label' => 'Home', 'url' => Yii::app()->createUrl('frontend/site/index'), 'active' => $this->id == 'site'),
                                        array('label' => Yii::t('frontend', 'Home'), 'url' => Yii::app()->homeUrl, 'active' => $this->id == 'site'),
                                        array('label' => Yii::t('frontend', 'Browse'), 'url' => Yii::app()->createUrl('frontend/search/index'), 'active' => $this->id == 'search'),
                                        array('label' => Yii::t('frontend', 'My Favourites'), 'url' => Yii::app()->createUrl('frontend/favourite/index'), 'active' => $this->id == 'favourite'),
//                                        array('label' => 'Time Deals', 'url' => Yii::app()->createUrl('frontend/hotdeal/index'), 'active' => $this->id == 'hotdeal')
                                    ),
                                    'activeCssClass' => 'nav-active',
                                    'firstItemCssClass' => 'nav-first',
                                    'htmlOptions' => array('class' => 'navigation-sub'),
                                ));
                                ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 
</div>

